﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace System.Xml
{
    public static class XmlExt
    {
        public static XmlDocument LoadXml(string path)
        {
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(path);
            return xmlDoc;
        }

        public static XmlNode SelectNode(this XmlDocument value, string nodepath)
        {
            if (value == null) throw new Exception("没找到相关节点");
            return value.SelectSingleNode(nodepath);
        }
    }
}
